package com.itheima.dao.impl;

import com.itheima.dao.UserDao;
import com.itheima.domain.User;

public class UserDaoImpl implements UserDao {
    //按照用户名和密码查询对应的用户信息
    @Override
    public User findByNameAndPwd(String username, String pwd) {
        User u = null;
        if ("admin".equals(username) && "666".equals(pwd)) {
            u = new User();
            u.setId(10);
            u.setUsername("admin");
            u.setPwd("666");
        }
        return u;
    }
}
